package com.ruoyi.ams.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.ams.domain.AmsAssetRepairRecordDetail;
import com.ruoyi.ams.mapper.AmsAssetRepairRecordDetailMapper;
import com.ruoyi.ams.service.IAmsAssetRepairRecordDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 维修明细Service业务层处理
 * 
 * @author yfkj
 * @date 2022-05-16
 */
@Service
public class AmsAssetRepairRecordDetailServiceImpl extends ServiceImpl<AmsAssetRepairRecordDetailMapper, AmsAssetRepairRecordDetail>  implements IAmsAssetRepairRecordDetailService
{
    @Autowired
    private AmsAssetRepairRecordDetailMapper amsAssetRepairRecordDetailMapper;

    /**
     * 查询维修明细
     * 
     * @param repairRecordDetailId 维修明细主键
     * @return 维修明细
     */
    @Override
    public AmsAssetRepairRecordDetail selectAmsAssetRepairRecordDetailByRepairRecordDetailId(Long repairRecordDetailId)
    {
        return amsAssetRepairRecordDetailMapper.selectAmsAssetRepairRecordDetailByRepairRecordDetailId(repairRecordDetailId);
    }

    /**
     * 查询维修明细列表
     * 
     * @param amsAssetRepairRecordDetail 维修明细
     * @return 维修明细
     */
    @Override
    public List<AmsAssetRepairRecordDetail> selectAmsAssetRepairRecordDetailList(AmsAssetRepairRecordDetail amsAssetRepairRecordDetail)
    {
        return amsAssetRepairRecordDetailMapper.selectAmsAssetRepairRecordDetailList(amsAssetRepairRecordDetail);
    }

    /**
     * 新增维修明细
     * 
     * @param amsAssetRepairRecordDetail 维修明细
     * @return 结果
     */
    @Override
    public int insertAmsAssetRepairRecordDetail(AmsAssetRepairRecordDetail amsAssetRepairRecordDetail)
    {
        return amsAssetRepairRecordDetailMapper.insertAmsAssetRepairRecordDetail(amsAssetRepairRecordDetail);
    }

    /**
     * 修改维修明细
     * 
     * @param amsAssetRepairRecordDetail 维修明细
     * @return 结果
     */
    @Override
    public int updateAmsAssetRepairRecordDetail(AmsAssetRepairRecordDetail amsAssetRepairRecordDetail)
    {
        return amsAssetRepairRecordDetailMapper.updateAmsAssetRepairRecordDetail(amsAssetRepairRecordDetail);
    }

    /**
     * 批量删除维修明细
     * 
     * @param repairRecordDetailIds 需要删除的维修明细主键
     * @return 结果
     */
    @Override
    public int deleteAmsAssetRepairRecordDetailByRepairRecordDetailIds(Long[] repairRecordDetailIds)
    {
        return amsAssetRepairRecordDetailMapper.deleteAmsAssetRepairRecordDetailByRepairRecordDetailIds(repairRecordDetailIds);
    }

    /**
     * 删除维修明细信息
     * 
     * @param repairRecordDetailId 维修明细主键
     * @return 结果
     */
    @Override
    public int deleteAmsAssetRepairRecordDetailByRepairRecordDetailId(Long repairRecordDetailId)
    {
        return amsAssetRepairRecordDetailMapper.deleteAmsAssetRepairRecordDetailByRepairRecordDetailId(repairRecordDetailId);
    }
}
